#{extends 'main.html' /}
#{set title:'Ajouter Film' /}
 
#{if flash.success}
    <p class="success">${flash.success}</p>
#{/if}
<div id="login">
<h1>Ajouter un film</h1>
#{form @Movies.CreateMovie()}
	
   	<p>
        <label for="title">Titre :</label>
        <input type="text" name="Title" id="Title" value="${params.Title}"/>
        #{if errors.forKey('Title')}
			<span class="error">${errors.forKey('Title')}</span>
		#{/if}
    </p>
	<p>
        <label for="synopsis">Synopsis :</label>
        <textarea name="Synopsis" id="Synopsis" value="${params.Synopsis}" cols="100" rows="5"> </textarea>
         #{if errors.forKey('Synopsis')}
			<span class="error">${errors.forKey('Synopsis')}</span>
		#{/if}
    </p>
    <p>
        <label for="date">Date de sortie :</label>
        <input type="date" name="date" id="date" value="${params.date}"/>
         #{if errors.forKey('date')}
			<span class="error">${errors.forKey('date')}</span>
		#{/if}
    </p>
    <p>
        <label for="NameFirstName">Nom et Prénom de l'acteur principal :</label>
        <input type="text" name="ActorName" id="ActorName" value="${params.ActorName}"/>
        #{if errors.forKey('ActorName')}
			<span class="error">${errors.forKey('ActorName')}</span>
		#{/if}
        <input type="text" name="ActorFirstName" id="ActorFirstName" value="${params.ActorFirstName}"/>
        #{if errors.forKey('ActorFirstName')}
			<span class="error">${errors.forKey('ActorFirstName')}</span>
		#{/if}
    </p>
	<p>
        <label for="country">Pays :</label>
        <input type="text" name="country" id="country" value="${params.country}"/>
         #{if errors.forKey('country')}
			<span class="error">${errors.forKey('country')}</span>
		#{/if}
    </p>
	<p>
        <label for="Producer">Nom et Prénom du Producteur :</label>
        <input type="text" name="ProducerName" id="ProducerName" value="${params.ProducerName}"/>
         #{if errors.forKey('ProducerName')}
			<span class="error">${errors.forKey('ProducerName')}</span>
		#{/if}
        <input type="text" name="ProducerFirstName" id="ProducerFirstName" value="${params.ProducerFirstName}"/>
         #{if errors.forKey('ProducerFirstName')}
			<span class="error">${errors.forKey('ProducerFirstName')}</span>
		#{/if}
    </p>
	<p>
	    <input type="submit" value="Ajouter" />
	</p>
#{/form}      
</div>